//  this library.
import 'package:hktk_app/ienum/subject/sex_enum.dart';
import 'package:hktk_app/model/subject/note_model.dart';

class NoteVoModel extends NoteModel {
  String? createBy;
  SexEnum? sex;
  String? createTime;

  NoteVoModel({
    this.createBy,
    this.sex,
    this.createTime,
  });

  NoteVoModel.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
    createBy = json['createBy'];
    if (json["sex"] != null) {
      sex = SexEnum.getTypeEnum(json['sex']);
    }
    createTime = json['createTime'];
  }

  @override
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = super.toJson();
    data['createBy'] = createBy;
    if (sex != null) {
      data['sex'] = sex!.name;
    }
    data['createTime'] = createTime;
    return data;
  }
}
